#ifndef DYN_ODE_RK2_H
#define DYN_ODE_RK2_H

#include "dyn_ode.h"

/*! \brief Implementation of the RK2 integration
 * algorithm.
 *
 * We define a fixed stepsize RK2 algorithm, which is
 * a second-order method (O(h^3)).
 */

class RK2 : public ODE
{
public:
    /*! The constructor defines the variables
     * that we need to setup the integration.
     */
    RK2(MultiFunctor &func,
        colvec _initCond,
        double _start,
        double _end,
        double _initStepsize);

    /*! @name Inherited virtual functions.
     * Reimplementation of the pure virtual functions
     * of the base clas.
     */
    //@{
    colvec next(colvec previousStep);
    //@}
};

#endif // DYN_ODE_RK2_H
